<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="../css/docs.css" type="text/css" rel="stylesheet" />
<link href="../css/prettify.css" type="text/css" rel="stylesheet" />
<script src="../js/prettify.js" type="text/javascript"></script></head>
<body onLoad="prettyPrint()">
<div class="g-unit" id="doc-content">
<div id="api-info-block">
    <div class="api-level">H3C CAS云管理平台</div>
  </div>
  <div id="jd-header">
    <h1>查询虚拟机备份列表信息</h1>
  </div>
</div>
<div id="jd-content">
<div class="jd-descr">
<p>查询指定ID查看虚拟机做过的备份信息。</p>
<h2><a name="uri"></a>接口 URI</h2>
<p>/cas/casrs/backupStrategy/backupFileTree?domainId={id}</p>
<h2><a name="access"></a>访问方法</h2>
<dl>
  <dt><b>HTTP 方法</b></dt>
  <dd>GET</dd>
  <dt><b>消息体</b></dt>
  <div class="source">
  	<pre class="prettyprint lang-xml">无</pre>
  </div>
</dl>

<dt><a name="detail"></a><b>元素含义</b></dt>
  <table id="pubmethods" class="jd-sumtable">
    <tbody>
      <tr>
        <th colspan="2">路径参数（Path Parameter）</th>
      </tr>
      <tr>
        <td class="jd-typecol">id</td>
        <td width="100%" class="jd-linkcol"><span class="sympad">虚拟机 ID。</span>
            <div class="jd-descrdiv">长整数（long）类型，必须。</div></td>
      </tr>
  </table>

<h2><a name="result"></a>返回结果</h2>
<dl>
  <dt><b> 状态码</b></dt>
  <dd>
  <ul>
    <li>200 OK：成功。</li>
    </ul>
  <strong>回应</strong></dd>
  <div class="source">
    <pre class="prettyprint lang-xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;list xmlns:qemu=&quot;http://libvirt.org/schemas/domain/qemu/1.0&quot; xmlns:casprivate=&quot;cas_private_data&quot; xmlns:nsprd=&quot;prealloc_data&quot; xmlns:private=&quot;private_data&quot;&gt;<br>    &lt;rsBackupFile&gt;<br>        &lt;id&gt;6&lt;/id&gt;<br>        &lt;name&gt;bb1&lt;/name&gt;<br>        &lt;type&gt;cp&lt;/type&gt;<br>        &lt;mode&gt;0&lt;/mode&gt;<br>        &lt;location&gt;本地目录：/vms/vmbak&lt;/location&gt;<br>        &lt;domainId&gt;140&lt;/domainId&gt;<br>        &lt;time&gt;2018-02-10T11:20:17+08:00&lt;/time&gt;<br>        &lt;size&gt;13.32421875&lt;/size&gt;<br>        &lt;parentId&gt;0&lt;/parentId&gt;<br>        &lt;isLeaf&gt;1&lt;/isLeaf&gt;<br>        &lt;directory&gt;/vms/vmbak&lt;/directory&gt;<br>        &lt;isDelete&gt;1&lt;/isDelete&gt;<br>        &lt;backupType&gt;0&lt;/backupType&gt;<br>    &lt;/rsBackupFile&gt;<br>    &lt;rsBackupFile&gt;<br>        &lt;id&gt;7&lt;/id&gt;<br>        &lt;name&gt;zzzz1&lt;/name&gt;<br>        &lt;type&gt;scp&lt;/type&gt;<br>        &lt;mode&gt;0&lt;/mode&gt;<br>        &lt;location&gt;远端服务器：172.16.204.128 /vms/；SCP方式&lt;/location&gt;<br>        &lt;targetAddr&gt;172.16.204.128&lt;/targetAddr&gt;<br>        &lt;domainId&gt;140&lt;/domainId&gt;<br>        &lt;time&gt;2018-02-10T19:32:08+08:00&lt;/time&gt;<br>        &lt;size&gt;13.32421875&lt;/size&gt;<br>        &lt;parentId&gt;0&lt;/parentId&gt;<br>        &lt;isLeaf&gt;1&lt;/isLeaf&gt;<br>        &lt;directory&gt;/vms/&lt;/directory&gt;<br>        &lt;isDelete&gt;1&lt;/isDelete&gt;<br>        &lt;backupType&gt;0&lt;/backupType&gt;<br>    &lt;/rsBackupFile&gt;<br>    &lt;rsBackupFile&gt;<br>        &lt;id&gt;8&lt;/id&gt;<br>        &lt;name&gt;uuu&lt;/name&gt;<br>        &lt;type&gt;cp&lt;/type&gt;<br>        &lt;mode&gt;10&lt;/mode&gt;<br>        &lt;location&gt;本地目录：/vms/vmbak&lt;/location&gt;<br>        &lt;domainId&gt;140&lt;/domainId&gt;<br>        &lt;time&gt;2018-02-10T19:32:27+08:00&lt;/time&gt;<br>        &lt;size&gt;13.32421875&lt;/size&gt;<br>        &lt;parentId&gt;0&lt;/parentId&gt;<br>        &lt;isLeaf&gt;0&lt;/isLeaf&gt;<br>        &lt;directory&gt;/vms/vmbak&lt;/directory&gt;<br>        &lt;isDelete&gt;1&lt;/isDelete&gt;<br>        &lt;children&gt;<br>            &lt;id&gt;9&lt;/id&gt;<br>            &lt;name&gt;zz2&lt;/name&gt;<br>            &lt;type&gt;cp&lt;/type&gt;<br>            &lt;mode&gt;11&lt;/mode&gt;<br>            &lt;location&gt;本地目录：/vms/vmbak&lt;/location&gt;<br>            &lt;domainId&gt;140&lt;/domainId&gt;<br>            &lt;time&gt;2018-02-12T15:05:12+08:00&lt;/time&gt;<br>            &lt;size&gt;0.0390625&lt;/size&gt;<br>            &lt;parentId&gt;8&lt;/parentId&gt;<br>            &lt;isLeaf&gt;1&lt;/isLeaf&gt;<br>            &lt;directory&gt;/vms/vmbak&lt;/directory&gt;<br>            &lt;isDelete&gt;1&lt;/isDelete&gt;<br>            &lt;backupType&gt;0&lt;/backupType&gt;<br>        &lt;/children&gt;<br>        &lt;backupType&gt;0&lt;/backupType&gt;<br>    &lt;/rsBackupFile&gt;<br>    &lt;rsBackupFile&gt;<br>        &lt;id&gt;10&lt;/id&gt;<br>        &lt;name&gt;c1&lt;/name&gt;<br>        &lt;type&gt;cp&lt;/type&gt;<br>        &lt;mode&gt;20&lt;/mode&gt;<br>        &lt;location&gt;本地目录：/vms/vmbak&lt;/location&gt;<br>        &lt;domainId&gt;140&lt;/domainId&gt;<br>        &lt;time&gt;2018-02-12T15:05:27+08:00&lt;/time&gt;<br>        &lt;size&gt;13.32421875&lt;/size&gt;<br>        &lt;parentId&gt;0&lt;/parentId&gt;<br>        &lt;isLeaf&gt;0&lt;/isLeaf&gt;<br>        &lt;directory&gt;/vms/vmbak&lt;/directory&gt;<br>        &lt;isDelete&gt;0&lt;/isDelete&gt;<br>        &lt;children&gt;<br>            &lt;id&gt;11&lt;/id&gt;<br>            &lt;name&gt;c11&lt;/name&gt;<br>            &lt;type&gt;cp&lt;/type&gt;<br>            &lt;mode&gt;22&lt;/mode&gt;<br>            &lt;location&gt;本地目录：/vms/vmbak&lt;/location&gt;<br>            &lt;domainId&gt;140&lt;/domainId&gt;<br>            &lt;time&gt;2018-02-12T15:05:43+08:00&lt;/time&gt;<br>            &lt;size&gt;0.0390625&lt;/size&gt;<br>            &lt;parentId&gt;10&lt;/parentId&gt;<br>            &lt;isLeaf&gt;1&lt;/isLeaf&gt;<br>            &lt;directory&gt;/vms/vmbak&lt;/directory&gt;<br>            &lt;isDelete&gt;1&lt;/isDelete&gt;<br>            &lt;backupType&gt;0&lt;/backupType&gt;<br>        &lt;/children&gt;<br>        &lt;backupType&gt;0&lt;/backupType&gt;<br>    &lt;/rsBackupFile&gt;<br>&lt;/list&gt;</pre>
  </div>
</dl>
<dt><a name="detail"></a><b>元素含义</b></dt>
  <table id="pubmethods" class="jd-sumtable">
    <tbody>
      <tr>
        <th colspan="2">各子元素</th>
      </tr>
	  <tr>
        <td class="jd-typecol"><span class="prettyprint lang-xml">id</span></td>
        <td width="100%" class="jd-linkcol"><span class="sympad">备份文件的id。</span>
            <div class="jd-descrdiv">长整型（Long）类型。</div></td>
      </tr>
      <tr class="alt-color">
        <td class="jd-typecol"><span class="prettyprint lang-xml">name</span></td>
        <td width="100%" class="jd-linkcol"><span class="sympad">备份文件名称。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
      </tr>
      <tr>
        <td class="jd-typecol">type</td>
        <td class="jd-linkcol"><span class="sympad">备份目的地：cp ：本地，scp ：远程ssh方式， ftp。</span>：远程ftp方式。
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
      </tr>
      <tr class="alt-color">
        <td class="jd-typecol">mode</td>
        <td class="jd-linkcol">备份方式 0-全量，1-增量 10-首次增量的全量备份， 11-增量备份，20-首次差异备份，22-差异备份。
          <div class="jd-descrdiv">整型（Integer）类型。</div></td></tr>
	  <tr>
        <td class="jd-typecol"><span class="prettyprint lang-xml">location</span></td>
        <td class="jd-linkcol"><span class="sympad">备份目的描述。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
      </tr>
      <tr class="alt-color">
        <td class="jd-typecol">domainId</td>
        <td class="jd-linkcol"><span class="sympad">虚拟机ID</span>
          <div class="jd-descrdiv">长整数（Long）。</div></td>
      </tr>
      <tr>
        <td class="jd-typecol">time</td>
        <td class="jd-linkcol"><span class="sympad">备份时间。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
      </tr>
      <tr class="alt-color">
        <td class="jd-typecol"><span class="prettyprint lang-xml">size</span></td>
        <td class="jd-linkcol"><span class="sympad">备份文件大小。</span>
            <div class="jd-descrdiv">数字（Double）类型。</div></td>
      </tr>
      <tr>
        <td class="jd-typecol"><span class="prettyprint lang-xml">parentId</span></td>
        <td class="jd-linkcol">父备份文件的ID。
          <div class="jd-descrdiv">长整数（Long）。</div></td>
      </tr>
      <tr class="alt-color">
        <td class="jd-typecol"><span class="prettyprint lang-xml">directory</span></td>
        <td class="jd-linkcol"><span class="sympad">备份路径。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
      </tr>
      <tr>
        <td class="jd-typecol">backupType</td>
        <td class="jd-linkcol">备份类型：0 –整机备份，1-磁盘单独备份。
          <div class="jd-descrdiv">整型（Integer）类型。</div></td></tr>
      <tr class="alt-color">
        <td class="jd-typecol"><span class="prettyprint lang-xml">targetAddr</span></td>
        <td class="jd-linkcol"><span class="sympad">远端备份时，服务器地址</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
      </tr>
	        <tr>
        <td class="jd-typecol">children</td>
        <td class="jd-linkcol">子节点，机基于当前备份做的差异备份或者增量备份。
          <div class="jd-descrdiv">自定义类型。</div></td></tr>
    </table>

    <h2><a name="example"></a>应用举例</h2>
    <p>查询ID为”140“的虚拟机做过的备份文件列表。</p>
    <dl>
      <dt><b>请求</b></dt>
      <div class="source">
        <pre class="prettyprint lang-xml">GET http://192.168.10.80:8080/cas/casrs/backupStrategy/backupFileTree?domainId=140
accept: application/xml
</pre>
      </div>
      <dt><b>回应</b></dt>
      <div class="source"><pre class="prettyprint lang-xml">HTTP/1.1 200 OK<br>Content-Type: application/xml<br>Content-Length: 966<br>Date: Wed, 17 Sep 2014 03:22:19 GMT<br>Server: H3C-CVM<br><br>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;<br>&lt;list xmlns:qemu=&quot;http://libvirt.org/schemas/domain/qemu/1.0&quot; xmlns:casprivate=&quot;cas_private_data&quot; xmlns:nsprd=&quot;prealloc_data&quot; xmlns:private=&quot;private_data&quot;&gt;<br>    &lt;rsBackupFile&gt;<br>        &lt;id&gt;6&lt;/id&gt;<br>        &lt;name&gt;bb1&lt;/name&gt;<br>        &lt;type&gt;cp&lt;/type&gt;<br>        &lt;mode&gt;0&lt;/mode&gt;<br>        &lt;location&gt;本地目录：/vms/vmbak&lt;/location&gt;<br>        &lt;domainId&gt;140&lt;/domainId&gt;<br>        &lt;time&gt;2018-02-10T11:20:17+08:00&lt;/time&gt;<br>        &lt;size&gt;13.32421875&lt;/size&gt;<br>        &lt;parentId&gt;0&lt;/parentId&gt;<br>        &lt;isLeaf&gt;1&lt;/isLeaf&gt;<br>        &lt;directory&gt;/vms/vmbak&lt;/directory&gt;<br>        &lt;isDelete&gt;1&lt;/isDelete&gt;<br>        &lt;backupType&gt;0&lt;/backupType&gt;<br>    &lt;/rsBackupFile&gt;<br>    &lt;rsBackupFile&gt;<br>        &lt;id&gt;7&lt;/id&gt;<br>        &lt;name&gt;zzzz1&lt;/name&gt;<br>        &lt;type&gt;scp&lt;/type&gt;<br>        &lt;mode&gt;0&lt;/mode&gt;<br>        &lt;location&gt;远端服务器：172.16.204.128 /vms/；SCP方式&lt;/location&gt;<br>        &lt;targetAddr&gt;172.16.204.128&lt;/targetAddr&gt;<br>        &lt;domainId&gt;140&lt;/domainId&gt;<br>        &lt;time&gt;2018-02-10T19:32:08+08:00&lt;/time&gt;<br>        &lt;size&gt;13.32421875&lt;/size&gt;<br>        &lt;parentId&gt;0&lt;/parentId&gt;<br>        &lt;isLeaf&gt;1&lt;/isLeaf&gt;<br>        &lt;directory&gt;/vms/&lt;/directory&gt;<br>        &lt;isDelete&gt;1&lt;/isDelete&gt;<br>        &lt;backupType&gt;0&lt;/backupType&gt;<br>    &lt;/rsBackupFile&gt;<br>    &lt;rsBackupFile&gt;<br>        &lt;id&gt;8&lt;/id&gt;<br>        &lt;name&gt;uuu&lt;/name&gt;<br>        &lt;type&gt;cp&lt;/type&gt;<br>        &lt;mode&gt;10&lt;/mode&gt;<br>        &lt;location&gt;本地目录：/vms/vmbak&lt;/location&gt;<br>        &lt;domainId&gt;140&lt;/domainId&gt;<br>        &lt;time&gt;2018-02-10T19:32:27+08:00&lt;/time&gt;<br>        &lt;size&gt;13.32421875&lt;/size&gt;<br>        &lt;parentId&gt;0&lt;/parentId&gt;<br>        &lt;isLeaf&gt;0&lt;/isLeaf&gt;<br>        &lt;directory&gt;/vms/vmbak&lt;/directory&gt;<br>        &lt;isDelete&gt;1&lt;/isDelete&gt;<br>        &lt;children&gt;<br>            &lt;id&gt;9&lt;/id&gt;<br>            &lt;name&gt;zz2&lt;/name&gt;<br>            &lt;type&gt;cp&lt;/type&gt;<br>            &lt;mode&gt;11&lt;/mode&gt;<br>            &lt;location&gt;本地目录：/vms/vmbak&lt;/location&gt;<br>            &lt;domainId&gt;140&lt;/domainId&gt;<br>            &lt;time&gt;2018-02-12T15:05:12+08:00&lt;/time&gt;<br>            &lt;size&gt;0.0390625&lt;/size&gt;<br>            &lt;parentId&gt;8&lt;/parentId&gt;<br>            &lt;isLeaf&gt;1&lt;/isLeaf&gt;<br>            &lt;directory&gt;/vms/vmbak&lt;/directory&gt;<br>            &lt;isDelete&gt;1&lt;/isDelete&gt;<br>            &lt;backupType&gt;0&lt;/backupType&gt;<br>        &lt;/children&gt;<br>        &lt;backupType&gt;0&lt;/backupType&gt;<br>    &lt;/rsBackupFile&gt;<br>    &lt;rsBackupFile&gt;<br>        &lt;id&gt;10&lt;/id&gt;<br>        &lt;name&gt;c1&lt;/name&gt;<br>        &lt;type&gt;cp&lt;/type&gt;<br>        &lt;mode&gt;20&lt;/mode&gt;<br>        &lt;location&gt;本地目录：/vms/vmbak&lt;/location&gt;<br>        &lt;domainId&gt;140&lt;/domainId&gt;<br>        &lt;time&gt;2018-02-12T15:05:27+08:00&lt;/time&gt;<br>        &lt;size&gt;13.32421875&lt;/size&gt;<br>        &lt;parentId&gt;0&lt;/parentId&gt;<br>        &lt;isLeaf&gt;0&lt;/isLeaf&gt;<br>        &lt;directory&gt;/vms/vmbak&lt;/directory&gt;<br>        &lt;isDelete&gt;0&lt;/isDelete&gt;<br>        &lt;children&gt;<br>            &lt;id&gt;11&lt;/id&gt;<br>            &lt;name&gt;c11&lt;/name&gt;<br>            &lt;type&gt;cp&lt;/type&gt;<br>            &lt;mode&gt;22&lt;/mode&gt;<br>            &lt;location&gt;本地目录：/vms/vmbak&lt;/location&gt;<br>            &lt;domainId&gt;140&lt;/domainId&gt;<br>            &lt;time&gt;2018-02-12T15:05:43+08:00&lt;/time&gt;<br>            &lt;size&gt;0.0390625&lt;/size&gt;<br>            &lt;parentId&gt;10&lt;/parentId&gt;<br>            &lt;isLeaf&gt;1&lt;/isLeaf&gt;<br>            &lt;directory&gt;/vms/vmbak&lt;/directory&gt;<br>            &lt;isDelete&gt;1&lt;/isDelete&gt;<br>            &lt;backupType&gt;0&lt;/backupType&gt;<br>        &lt;/children&gt;<br>        &lt;backupType&gt;0&lt;/backupType&gt;<br>    &lt;/rsBackupFile&gt;<br>&lt;/list&gt;<br></pre>
      </div>
    </dl>
    
</div>
</div>
</div>
</body>
</html>